/**
 * initialize your data structure here.
 */
var MinStack = function() {
    this.stack = [];
};

/** 
 * @param {number} x
 * @return {void}
 */
MinStack.prototype.push = function(x) {
    this.stack.push(x) 
};

/**
 * @return {void}
 */
MinStack.prototype.pop = function() {
    this.stack.pop()
};

/**
 * @return {number}
 */
MinStack.prototype.top = function() {
    if(!this.stack.length)return 
    return this.stack[this.stack.length-1] 
};

/**
 * @return {number}
 */
MinStack.prototype.getMin = function() {
    
};
const minStack = new MinStack();
minStack.push(-2);
minStack.push(2);
minStack.push(-3);
minStack.getMin();   //--> 返回 -3.
minStack.pop();
minStack.top();      //--> 返回 2.
minStack.getMin();   //--> 返回 -2.